
 <script>
	
	  unevaleur={{ HdvAchats|length }};
	  elemenselect=0;
	  finish=0;

	function liens_objets(title,num){
	
		elemselect=num;
		//var test= document.getElementById(num).style.display;

	
		for(i=0;i<={{ HdvAchats|length }};i++)//jusqu'au nombre d'université
		{
		//var mySpan = document.getElementById(i);
			if(i == num )
			{	//alert('show #objet'+i);
				 //$('#objet'+i).popover('hide');
				//$('show #objet'+i).popover('show');
			}
			else
			{
				//alert('hide #objet'+i);
			        $('#objet'+i).popover('hide');
			}
		
		}
	}







	window.onload = function(){
	$('#myModal').modal('hide')
	var img = '<img src="https://si0.twimg.com/a/1339639284/images/three_circles/twitter-bird-white-on-blue.png" >';
		for(i=0;i<=unevaleur;i++)
		{
		$(function (){ $("#objet" + i).popover(); });
		
		}
	}
	
</script>

 {% set i = 0 %} 

<br />

<h3> Historique des achats </h3>
		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table table-bordered">
			<thead>
				<tr style="background:rgba(0, 0, 0, 0.6);color:white;">
				<th>Objets</th>
				<th>Nom</th>
				
				<th>Prix</th>
				
				
				<th>Date de Debut</th>
				<th>Date de Fin</th>

				
				
				</tr>   
			</thead>
		{% if HdvAchats is defined %}	
				
			{% for HdvAchat in HdvAchats %}

			<tr id="" style="background:rgba(255, 255,255, 0.3);" > <!-- *********************************FINIRRRRRRRRRRRR ********************************-->
				<td><img src="{{ asset('bundles/d3hdvdiablo3/images/uploads/objetsmodele/'~HdvAchat.D3Objet.ObjetModele.image ) }}" alt="{{ HdvAchat.D3Objet.ObjetModele.nom }}" class="img-polaroid" width=25px height=25px /></td>
				<td><strong>{{ HdvAchat.D3Objet.ObjetModele.nom }}</strong></td>
				
				
				<td>
				{% if HdvAchat.typePaiement == 0 %}
					<span class="colorOr">{{ HdvAchat.prix | number_format(0, '.', ' ')}} </span>
				{% else %}
					<span class="colorArgent">{{ HdvAchat.prix | number_format(0, '.', ' ')}} </span>
				{% endif %}
				</td>
							
				
				<td>{{ HdvAchat.dateDebut|date("m/d/Y") }}<br />{{ HdvAchat.dateDebut|date("H:i:s") }}</td>
				<td>
				{% if HdvAchat.dateFin == NULL %}
					Vente pas encore conclue
				{% else %}
					{{ HdvAchat.dateFin|date("m/d/Y") }}<br />{{ HdvAchat.dateFin|date("H:i:s") }}
				{% endif %}
				</td>
						
			</tr> 
	
			{% endfor %}
			</table> 
		{% else %}
			Pas encore d'objet vendu !!
			
		{% endif %}
		{#{% if hdvachats_page is defined %}#}
		
			{% if hdvachats_last_page > 1 %}

				<ol>
				  {% for hdvachats_page in 1..hdvachats_last_page %}
					  {% if hdvachats_page == hdvachats_current_page %}
					  	{{ hdvachats_page }}
					  {% else %}
						{% if current_page is defined %}
							{{ current_page }}
							defined
					  		<a id="page" href="{{ path('D3hdv_hdv_jeux_mes_ventes_objets', { 'hdvachats_page': hdvachats_page, 'page' : page }) }}">{{ hdvachats_page }}</a>
						{% else %}
							
							<a id="page" href="{{ path('D3hdv_hdv_jeux_mes_ventes_objets', { 'hdvachats_page': hdvachats_page, 'page' : 1 }) }}">{{ hdvachats_page }}</a>
							pas defined
						{% endif %}
					  {% endif %}
				  {% endfor %}
				</ol>

			{% endif %}
			      <div class="pagination_desc"> 
				 
			{% if hdvachats_last_page > 1 %}
				- page <strong>{{ hdvachats_current_page }}/{{ hdvachats_last_page }}</strong> {% endif %} </div><br />
		
		{#{% endif %}#}




